<?php

namespace Admin\Controller;

class ContentController extends AdminbaseController {

    function _initialize() {
        parent::_initialize();
        $this->currentModel = D("Content");
    }

    //首页
    public function about() {
        $map["type"] = "about";
        $info = $this->currentModel->queryByMap($map);

        $this->assign("info", $info);
        $this->display();
    }

    /**
     * 保存数据
     */
    public function saveAbout() {

        $map["type"] = "about";
        $info = $this->currentModel->queryByMap($map);

        $info["value"] = html_entity_decode($_REQUEST["description"]);

        $this->currentModel->updateInfo($info);

        $this->success("保存成功", U("content/about"));

    }

}